﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DB_Connect
{
    class Program
    {
        static void Main(string[] args)
        {
            TimeSpan timeOut = new TimeSpan(1000);

            MySqlConnection db1 = new MySqlConnection("connectString1", timeOut);
            db1.OpenConnection();
            db1.CloseConnection();
            Console.WriteLine(db1.ConnectionString);
            Console.WriteLine();

            MsSqlConnection db2 = new MsSqlConnection("connectString2", timeOut);
            db2.OpenConnection();
            db2.CloseConnection();
            Console.WriteLine(db2.ConnectionString);
            Console.WriteLine();

            DatabaseComment MySQL = new DatabaseComment(db1, "do SQL for MySql Connection.");
            MySQL.Execute();
            Console.WriteLine();

            DatabaseComment MsSQL = new DatabaseComment(db2, "do SQL for MsSql Connection.");
            MsSQL.Execute();
        }
    }
}
